﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LoA.MapEngine;
using LoA.Shared.Interfaces;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace LoA.MapEngine {
	public partial class MapComponent : DrawableGameComponent {
		public override void Draw(GameTime gameTime) {
			if (this.Visible) {
				for (int i = 0; i < 9; i++) {
					if (this.Maps[i] != null)
						this.Maps[i].DrawMap(Camera);
				}
#if DEBUG
				spriteBatch.Begin( );
				spriteBatch.DrawString(spriteFont, "Map: " + this.currentRegion + "[X:" + this.currentFragment.X.ToString( ) + ", Y:" + this.currentFragment.Y.ToString( ) + "]", new Vector2(1, this.GraphicsDevice.Viewport.Height - 25), Color.WhiteSmoke);
				spriteBatch.End( );
#endif
			}

			base.Draw(gameTime);
		}
	}
}
